﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

/// <summary>
///BasePage 的摘要说明
/// </summary>
public class BasePage : System.Web.UI.Page
{
    public BasePage()
    {

    }

    protected override void OnLoad(EventArgs e)
    {
        base.OnLoad(e);
        //return;
        if (!Helper.HasLogin())
        {
            Response.Redirect("Login.aspx", true);
        }
    }

    protected void Alert(string message)
    {
        message = message.Replace("'", "\'");
        message = message.Replace("\"", "\\\"");
        ClientScript.RegisterClientScriptBlock(typeof(string), "", "window.alert('" + message + "');",true);
    }
}